package com.zc.im.mapper.user;

import com.zc.im.model.user.ZcComInfo;
import com.zc.im.model.user.ZcComInfoExample;
import com.zc.im.model.user.ZcComInfoKey;
import com.zc.im.model.user.ZcComInfoWithBLOBs;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectKey;
import org.apache.ibatis.annotations.Update;

public interface ZcComInfoMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zc_com_info
     *
     * @mbggenerated
     */
    int countByExample(ZcComInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zc_com_info
     *
     * @mbggenerated
     */
    int deleteByExample(ZcComInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zc_com_info
     *
     * @mbggenerated
     */
    @Delete({
        "delete from zc_com_info",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(ZcComInfoKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zc_com_info
     *
     * @mbggenerated
     */
    @Insert({
        "insert into zc_com_info (id, uid, ",
        "company_name, company_short, ",
        "logo, special, website, ",
        "register_job, nature, ",
        "scale, industry, ",
        "culture, welfare, ",
        "financing, email, ",
        "license, contacts, ",
        "phone, province, ",
        "city, area, street, ",
        "province_cn, address, ",
        "longitude, latitude, ",
        "exhibition, status, ",
        "star, star_rec, star_describe, ",
        "star_interview, star_environment, ",
        "product_name, product_specialty, ",
        "product_introduce, sid, ",
        "source, boss_label, ",
        "grade, admin_sale, ",
        "`range`, morning_work_time, ",
        "morning_rest_time, afternoon_work_time, ",
        "afternoon_rest_time, introduce)",
        "values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=INTEGER}, ",
        "#{companyName,jdbcType=VARCHAR}, #{companyShort,jdbcType=VARCHAR}, ",
        "#{logo,jdbcType=VARCHAR}, #{special,jdbcType=VARCHAR}, #{website,jdbcType=VARCHAR}, ",
        "#{registerJob,jdbcType=VARCHAR}, #{nature,jdbcType=TINYINT}, ",
        "#{scale,jdbcType=TINYINT}, #{industry,jdbcType=VARCHAR}, ",
        "#{culture,jdbcType=VARCHAR}, #{welfare,jdbcType=VARCHAR}, ",
        "#{financing,jdbcType=INTEGER}, #{email,jdbcType=VARCHAR}, ",
        "#{license,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, ",
        "#{phone,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR}, ",
        "#{city,jdbcType=VARCHAR}, #{area,jdbcType=VARCHAR}, #{street,jdbcType=VARCHAR}, ",
        "#{provinceCn,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, ",
        "#{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, ",
        "#{exhibition,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, ",
        "#{star,jdbcType=REAL}, #{starRec,jdbcType=REAL}, #{starDescribe,jdbcType=REAL}, ",
        "#{starInterview,jdbcType=REAL}, #{starEnvironment,jdbcType=REAL}, ",
        "#{productName,jdbcType=VARCHAR}, #{productSpecialty,jdbcType=VARCHAR}, ",
        "#{productIntroduce,jdbcType=VARCHAR}, #{sid,jdbcType=VARCHAR}, ",
        "#{source,jdbcType=VARCHAR}, #{bossLabel,jdbcType=VARCHAR}, ",
        "#{grade,jdbcType=VARCHAR}, #{adminSale,jdbcType=INTEGER}, ",
        "#{range,jdbcType=VARCHAR}, #{morningWorkTime,jdbcType=VARCHAR}, ",
        "#{morningRestTime,jdbcType=VARCHAR}, #{afternoonWorkTime,jdbcType=VARCHAR}, ",
        "#{afternoonRestTime,jdbcType=VARCHAR}, #{introduce,jdbcType=LONGVARCHAR})"
    })
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=true, resultType=Integer.class)
    int insert(ZcComInfoWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zc_com_info
     *
     * @mbggenerated
     */
    int insertSelective(ZcComInfoWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zc_com_info
     *
     * @mbggenerated
     */
    List<ZcComInfoWithBLOBs> selectByExampleWithBLOBs(ZcComInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zc_com_info
     *
     * @mbggenerated
     */
    List<ZcComInfo> selectByExample(ZcComInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zc_com_info
     *
     * @mbggenerated
     */
    @Select({
        "select",
        "id, uid, company_name, company_short, logo, special, website, register_job, ",
        "nature, scale, industry, culture, welfare, financing, email, license, contacts, ",
        "phone, province, city, area, street, province_cn, address, longitude, latitude, ",
        "exhibition, status, star, star_rec, star_describe, star_interview, star_environment, ",
        "product_name, product_specialty, product_introduce, sid, source, boss_label, ",
        "grade, admin_sale, `range`, morning_work_time, morning_rest_time, afternoon_work_time, ",
        "afternoon_rest_time, introduce",
        "from zc_com_info",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @ResultMap("ResultMapWithBLOBs")
    ZcComInfoWithBLOBs selectByPrimaryKey(ZcComInfoKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zc_com_info
     *
     * @mbggenerated
     */
    int updateByExampleSelective(@Param("record") ZcComInfoWithBLOBs record, @Param("example") ZcComInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zc_com_info
     *
     * @mbggenerated
     */
    int updateByExampleWithBLOBs(@Param("record") ZcComInfoWithBLOBs record, @Param("example") ZcComInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zc_com_info
     *
     * @mbggenerated
     */
    int updateByExample(@Param("record") ZcComInfo record, @Param("example") ZcComInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zc_com_info
     *
     * @mbggenerated
     */
    int updateByPrimaryKeySelective(ZcComInfoWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zc_com_info
     *
     * @mbggenerated
     */
    @Update({
        "update zc_com_info",
        "set uid = #{uid,jdbcType=INTEGER},",
          "company_name = #{companyName,jdbcType=VARCHAR},",
          "company_short = #{companyShort,jdbcType=VARCHAR},",
          "logo = #{logo,jdbcType=VARCHAR},",
          "special = #{special,jdbcType=VARCHAR},",
          "website = #{website,jdbcType=VARCHAR},",
          "register_job = #{registerJob,jdbcType=VARCHAR},",
          "nature = #{nature,jdbcType=TINYINT},",
          "scale = #{scale,jdbcType=TINYINT},",
          "industry = #{industry,jdbcType=VARCHAR},",
          "culture = #{culture,jdbcType=VARCHAR},",
          "welfare = #{welfare,jdbcType=VARCHAR},",
          "financing = #{financing,jdbcType=INTEGER},",
          "email = #{email,jdbcType=VARCHAR},",
          "license = #{license,jdbcType=VARCHAR},",
          "contacts = #{contacts,jdbcType=VARCHAR},",
          "phone = #{phone,jdbcType=VARCHAR},",
          "province = #{province,jdbcType=VARCHAR},",
          "city = #{city,jdbcType=VARCHAR},",
          "area = #{area,jdbcType=VARCHAR},",
          "street = #{street,jdbcType=VARCHAR},",
          "province_cn = #{provinceCn,jdbcType=VARCHAR},",
          "address = #{address,jdbcType=VARCHAR},",
          "longitude = #{longitude,jdbcType=VARCHAR},",
          "latitude = #{latitude,jdbcType=VARCHAR},",
          "exhibition = #{exhibition,jdbcType=VARCHAR},",
          "status = #{status,jdbcType=TINYINT},",
          "star = #{star,jdbcType=REAL},",
          "star_rec = #{starRec,jdbcType=REAL},",
          "star_describe = #{starDescribe,jdbcType=REAL},",
          "star_interview = #{starInterview,jdbcType=REAL},",
          "star_environment = #{starEnvironment,jdbcType=REAL},",
          "product_name = #{productName,jdbcType=VARCHAR},",
          "product_specialty = #{productSpecialty,jdbcType=VARCHAR},",
          "product_introduce = #{productIntroduce,jdbcType=VARCHAR},",
          "sid = #{sid,jdbcType=VARCHAR},",
          "source = #{source,jdbcType=VARCHAR},",
          "boss_label = #{bossLabel,jdbcType=VARCHAR},",
          "grade = #{grade,jdbcType=VARCHAR},",
          "admin_sale = #{adminSale,jdbcType=INTEGER},",
          "`range` = #{range,jdbcType=VARCHAR},",
          "morning_work_time = #{morningWorkTime,jdbcType=VARCHAR},",
          "morning_rest_time = #{morningRestTime,jdbcType=VARCHAR},",
          "afternoon_work_time = #{afternoonWorkTime,jdbcType=VARCHAR},",
          "afternoon_rest_time = #{afternoonRestTime,jdbcType=VARCHAR},",
          "introduce = #{introduce,jdbcType=LONGVARCHAR}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKeyWithBLOBs(ZcComInfoWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zc_com_info
     *
     * @mbggenerated
     */
    @Update({
        "update zc_com_info",
        "set uid = #{uid,jdbcType=INTEGER},",
          "company_name = #{companyName,jdbcType=VARCHAR},",
          "company_short = #{companyShort,jdbcType=VARCHAR},",
          "logo = #{logo,jdbcType=VARCHAR},",
          "special = #{special,jdbcType=VARCHAR},",
          "website = #{website,jdbcType=VARCHAR},",
          "register_job = #{registerJob,jdbcType=VARCHAR},",
          "nature = #{nature,jdbcType=TINYINT},",
          "scale = #{scale,jdbcType=TINYINT},",
          "industry = #{industry,jdbcType=VARCHAR},",
          "culture = #{culture,jdbcType=VARCHAR},",
          "welfare = #{welfare,jdbcType=VARCHAR},",
          "financing = #{financing,jdbcType=INTEGER},",
          "email = #{email,jdbcType=VARCHAR},",
          "license = #{license,jdbcType=VARCHAR},",
          "contacts = #{contacts,jdbcType=VARCHAR},",
          "phone = #{phone,jdbcType=VARCHAR},",
          "province = #{province,jdbcType=VARCHAR},",
          "city = #{city,jdbcType=VARCHAR},",
          "area = #{area,jdbcType=VARCHAR},",
          "street = #{street,jdbcType=VARCHAR},",
          "province_cn = #{provinceCn,jdbcType=VARCHAR},",
          "address = #{address,jdbcType=VARCHAR},",
          "longitude = #{longitude,jdbcType=VARCHAR},",
          "latitude = #{latitude,jdbcType=VARCHAR},",
          "exhibition = #{exhibition,jdbcType=VARCHAR},",
          "status = #{status,jdbcType=TINYINT},",
          "star = #{star,jdbcType=REAL},",
          "star_rec = #{starRec,jdbcType=REAL},",
          "star_describe = #{starDescribe,jdbcType=REAL},",
          "star_interview = #{starInterview,jdbcType=REAL},",
          "star_environment = #{starEnvironment,jdbcType=REAL},",
          "product_name = #{productName,jdbcType=VARCHAR},",
          "product_specialty = #{productSpecialty,jdbcType=VARCHAR},",
          "product_introduce = #{productIntroduce,jdbcType=VARCHAR},",
          "sid = #{sid,jdbcType=VARCHAR},",
          "source = #{source,jdbcType=VARCHAR},",
          "boss_label = #{bossLabel,jdbcType=VARCHAR},",
          "grade = #{grade,jdbcType=VARCHAR},",
          "admin_sale = #{adminSale,jdbcType=INTEGER},",
          "`range` = #{range,jdbcType=VARCHAR},",
          "morning_work_time = #{morningWorkTime,jdbcType=VARCHAR},",
          "morning_rest_time = #{morningRestTime,jdbcType=VARCHAR},",
          "afternoon_work_time = #{afternoonWorkTime,jdbcType=VARCHAR},",
          "afternoon_rest_time = #{afternoonRestTime,jdbcType=VARCHAR}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(ZcComInfo record);
}